<?php

include('../functions/db.php');
include('../functions/common.php');


$id_ankete = mres($_POST['id_ankete']); 
$username = mres($_POST['username']);
if (isset($_POST['pool_submit'])) {

    if (isset($_POST['pool_select'])) {
        $pool_select = mres(($_POST['pool_select']));
        setcookie('anketa', 'glasao', time()+3600, '/');
        insertPoolVotes($id_ankete, $username, $pool_select);
    }

}
header("Location: ../?page=pocetna");
?>
